using AndyPike.Commons;
using AndyPike.Commons.Persistence;
using AndyPike.Snowflake.Core.Messages;
using AndyPike.Snowflake.Entities;

namespace AndyPike.Snowflake.Core.Mappers
{
    public class AccountToAccountInfoMessageMapper : IEntityToMessageMapper<Account, AccountInfoMessage>
    {
        public AccountInfoMessage Map(Account account)
        {
            GuardAgainst.ArgumentNull(account, "account");

            return new AccountInfoMessage { UserName = account.UserName, Email = account.Email };
        }
    }
}